﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace AntC.AspNetCore.ApiEncryption.Internal.Interfaces
{
    /// <summary>
    /// api接口加密策略提供器
    /// </summary>
    public interface IApiEncryptionPolicyProvider
    {
        /// <summary>
        /// 当前请求是否要提供接口数据解密功能
        /// </summary>
        /// <param name="context">上下文</param>
        /// <returns></returns>
        bool IsDecryptCurrentRequest(ApiEncryptionContext context);

        /// <summary>
        /// 当前响应是否要提供接口数据加密功能
        /// </summary>
        /// <param name="context">上下文</param>
        /// <returns></returns>
        bool IsEncryptCurrentResponse(ApiEncryptionContext context);
    }
}
